﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright company="Microsoft Corp." file="SchedulerJob.cs">
//   All rights reserved. See License.txt in the project root for license information.
// </copyright>
// 
// --------------------------------------------------------------------------------------------------------------------
namespace HpcSchedulerManagement.DataContracts
{
    public class SchedulerJob
    {
        public SchedulerJob()
        {
            this.UnitType = HpcSchedulerManagement.DataContracts.UnitType.Core;
            this.State = JobState.Configuring;
        }

        public int Id { get; set; }
        
        public string Name { get; set; }

        public string UserName { get; set; }

        public string Project { get; set; }

        public int? RuntimeSeconds { get; set; }

        public int? MinCores { get; set; }

        public int? MaxCores { get; set; }

        public int? MinSockets { get; set; }

        public int? MaxSockets { get; set; }

        public int? MinNodes { get; set; }

        public int? MaxNodes { get; set; }

        public UnitType? UnitType { get; set; }

        public string RequestedNodes { get; set; }

        public bool? IsExclusive { get; set; }

        public bool? RunUntilCanceled { get; set; }

        public string NodeGroups { get; set; }

        public bool? FailOnTaskFailure { get; set; }

        public bool? AutoCalculateMax { get; set; }

        public bool? AutoCalculateMin { get; set; }

        public bool? Preemptable { get; set; }

        public int? MinMemory { get; set; }

        public int? MaxMemory { get; set; }

        public int? MinCoresPerNode { get; set; }

        public int? MaxCoresPerNode { get; set; }

        public string SoftwareLicense { get; set; }

        public string OrderBy { get; set; }

        public string ClientSource { get; set; }

        public int? Progress { get; set; }

        public string ProgressMessage { get; set; }

        public int? TargetResourceCount { get; set; }

        public int? ExpandedPriority { get; set; }

        public string ServiceName { get; set; }

        public bool? NotifyOnStart { get; set; }

        public bool? NotifyOnCompletion { get; set; }

        public string EmailAddress { get; set; }

        public JobPriority? Priority { get; set; }

        public string Password { get; set; }

        public string JobTemplate { get; set; }

        public JobType? JobType { get; set; }

        public int? RequeueCount { get; set; }

        public int? AutoRequeueCount { get; set; }

        public string RequestCancel { get; set; }

        public string Owner { get; set; }

        public string SubmitTime { get; set; }
        
        public string CreateTime { get; set; }
        
        public string StartTime { get; set; }
        
        public string EndTime { get; set; }
        
        public JobState State { get; set; }

        public string HoldUntil { get; set; }

        public bool HasRuntime { get; set; }

        public bool CanGrow { get; set; }

        public bool CanShrink { get; set; }

        public JobState PreviousState { get; set; }

        public string ChangeTime { get; set; }

        public string ExcludedNodes { get; set; }

        public string AllocatedNodes { get; set; }
    }
}